﻿<div class="container">
    <div class="row">
        <div ng-controller="createJobsController">
            <h4>{{title}}</h4>
            Search: <input type="text" ng-model="search.$" />
            <table class="table table-condensed table-hover">
                <tr ng-repeat="job in jobsAvailable | orderBy:mySortFunction | filter:search">
                    <td>
                        <a ng-click="MOTIVZviewDetails(job)" class="btn btn-primary announce" data-toggle="modal" data-id="{{job.ID}}"><span class="fa fa-plus" aria-hidden="true"></span></a>
                    </td>
                    <td>{{job.Title}}</td>
                    <td>{{job.jobPlatform}}</td>
                </tr>
            </table>
        </div>
    </div>

    <!--
    ===========================================================================================================================
    -->
    <!-- BEGIN: Form modal -->
    <div id="MOTIVZscheduleJobForm" class="modal fade">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="modalJobName"></h4>
                </div>
                <div class="modal-body">
                    <!-- BEGIN: Job form -->
                    <div class="panel panel-primary">
                        <div class="panel-heading" id="MOTIVZjobTitle"></div>
                        <div class="panel-body">
                            <blockquote id="MOTIVZjobDescription">{{job.ID}}</blockquote>
                            <blockquote id="MOTIVZjobFieldsShow"></blockquote>
                            <div id="MOTIVZjobFormContainer"></div>
                            <!--
                            <blockquote id="MOTIVZjobFooter"></blockquote>
                            -->
                        </div>
                    </div>
                    <!-- END: Job form -->
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>
    <!-- END: Form modal -->
    <!-- BEGIN: Creating job modal -->
    <div class="modal" id="MOTIVZcreatingJobmodal" data-backdrop="static" data-keyboard="false">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">Please wait...</h4>
                </div>
                <div class="modal-body">
                    <p>Creating new job...</p>
                </div>
                <div class="modal-footer">
                </div>
            </div>
        </div>
    </div>
    <!-- END: Creating job modal -->
</div>